home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-12-11 | 9.6 KB | 248 lines | [TEXT/TPAS] |
-
- Welcome to Turbo Pascal Database Toolbox
- ----------------------------------------
-
- This file contains information not found in the Owner's Handbook.
- It includes information on how to get technical support, corrections
- and omissions concerning the manual and files on the distribution disks.
- Since this information is very important to you, please read this file in
- its entirety.
-
-
-
-
- TABLE OF CONTENTS
- ------------------
-
- 1. How to get Help
- 2. Combining High and Low Level Database routines
- 3. Configuring Turbo Access for HFS
- 4. Incompatible Unit Versions
- 5. Using Database Toolbox with MultiFinder
- 6. Using the List Manager with the Database Toolbox
- 7. Files on the disk
-
-
- 1. HOW TO GET HELP
- ------------------
- If you need help with Turbo Pascal Database Toolbox, read this
- file and the reference manual.
-
- If you still have a question and need technical assistance, help
- is available from the following sources:
-
- 1. Type GO BORPRO on the CompuServe Information Service.
- 2. Check with your local software dealer or user group.
- 3. Write to: Borland International
- Turbo Pascal Database Toolbox Technical Support
- 4585 Scotts Valley Drive
- Scotts Valley, CA 95066
- 4. If you have an urgent problem that cannot wait, you can call
- the Borland Technical Support department. The phone number is
- (408) 438-5300.
-
- When calling or writing to technical support, you need to provide
- the following information:
-
- 1. Product serial number. We will not be able to provide
- technical assistance without this.
-
- 2. Product name and version number.
-
- 3. Macintosh Model and ROM type. Also, the brands and models of
- any additional hardware.
-
- 4. System and Finder version numbers (the Finder version number
- can be determined by looking in the Apple under About Finder...
- from the desktop).
-
-
- 2. COMBINING HIGH AND LOW LEVEL DATABASE ROUTINES
- -------------------------------------------------
- The manual discusses two main types of database routines that you may
- call from your programs: the low level routines (found in TAccess.Unit),
- and the high level routines (found in TAHigh.Unit). You can use both
- the high and the low level routines in a single program. The sample
- program called HITADemo.pas in the Access Samples folder shows you
- how to accomplish this.
-
- In order to retrieve information from a dataset (initially created
- with high level routines) with calls to low level routines, you will
- need to access the individual file types within a dataset, which are
- defined as below in TAHigh.Unit:
-
- type
- DataSet = record
- Data : DataFile;
- Index : IndexFile;
- end;
-
- While this type is transparent to the programmer for all of the
- calls to the high-level routines, you will have to use it for such
- low-level routines as GetRec, FindKey, SearchKey, UsedRecs, FileLen,
- etc. An example of this is given in the procedure below:
-
- Procedure TASize ( MyDataSet : DataSet;
- Var TotalRecords, UsedRecords: LongInt );
- Begin
- TotalRecords := FileLen (MyDataSet.Data);
- UsedRecords := UsedRecs (MyDataSet.Data);
- End; { TASize }
-
-
- Another example of how to access these two file types within a
- dataset is given in the RebuildDatabase procedure in HITADemo.pas.
-
-
-
- 3. CONFIGURING TURBO ACCESS FOR HFS
- -----------------------------------
-
- The Turbo Pascal Database Toolbox manual recommends that you copy
- over all the files from the Turbo Access folder to another folder
- that contains your Database Toolbox applications. While this is
- the simplest configuration of the Turbo Access files, it also
- results in duplication of the Turbo Access files from project to
- project. The alternative method described below allows you
- to have one copy of the Turbo Access folder for multiple Database
- Toolbox applications; please note that this method will work only
- with the HFS system.
-
- Instead of making copies of the Turbo Access files for each project
- you are working on, keep one copy of the files and develop each of
- your projects in folders nested in your Turbo Access folder. Using
- the $O and $I compiler directives, as described below, you will be
- able to compile custom versions of SetConst.pas, TAccessUnit and
- TAHigh.Unit for each of your projects.
-
- The general procedure to follow in developing a Turbo Access program
- would be:
- 1. Create a folder in your Turbo Access folder that will contain
- your project.
- 2. Temporarily modify the $I directive in SetConst.pas to get the
- .type file from the appropriate folder.
-
- program SetConst;
- {$R SetConst.rsrc}
- {$U-}
- {$U ConstUser}
- uses MemTypes, QuickDraw, OSIntf, ToolIntf,
- PackIntF, PasInOut, ConstUser;
-
- {$I :the_name_of_your_project_folder: .types }
- { ^^ Include file with your
- type declarations for MaxDataType
- and MaxKeyType }
-
- 3. Run SetConst.pas and put the generated constants definition file
- in the appropriate folder(your project folder).
- 4. Add a $O directive(indicating where to put the compiled unit) to
- TAccess.Unit and fill in the $I compiler directive indicating the
- location and name of the constant definition file.
-
- unit TAccess(7);
- {$0 :the_name_of_your_project_folder:TAccess}
-
- interface
- {$U-}
- uses MemTypes, QuickDraw, OSIntF, ToolIntf,PackIntf, PasInOut;
-
- {$I :the_name_of_your_project_folder: .const}
- { ^^^^^^^ Insert the name of
- your file of Turbo Access
- constants. }
-
- 5. Compile TAccess.Unit to disk.
- 6. Add a $O directive(indicating where to put the compiled unit) to
- TAHigh.Unit and modify the $U directive to indicate where the
- TAccess unit is.
-
- unit TAHigh(8);
- {$O :the_name_of_your_project_folder:TAHigh}
-
- interface
- {$U-}
- {$U :the_name_of_your_project_folder:TAccess}
- uses MemTypes, QuickDraw, OSIntF, ToolIntf, PackIntf, PasInOut,
- TAccess;
-
- 7. Compile TAHigh.Unit to disk.
-
-
- 4. INCOMPATIBLE UNIT VERSIONS
- -----------------------------
- When you are compiling a program that uses one of the Database
- Toolbox units, you may receive compiler error #89: "Incompatible
- Unit Versions". This will occur when the Database Toolbox unit
- is compiled with Turbo Pascal version 1.1 and you are compiling
- with version 1.0. If this occurs, you must open up the source file
- to the specific unit that is incompatible and recompile it to disk.
-
-
-
- 5. DATABASE TOOLBOX WITH MULTIFINDER
- -------------------------------------
- To run programs created with Database Toolbox under MultiFinder, it
- is recommended that you compile the program to disk, exit Turbo
- Pascal by clicking on the Finder from the apple menu, and run the
- program by double-clicking on the icon from the desktop. You
- should not attempt to compile and then run the program from memory
- within the Turbo Pascal integrated environment.
-
-
- USING THE LIST MANAGER WITH THE DATABASE TOOLBOX
- ------------------------------------------------
- The Btree.Pas program uses the List Manager Package, which
- is available only from versions of the System numbered 3.2
- or higher. Please contact your Apple dealer to obtain an
- updated System disk if you are using a System version less
- than 3.2.
-
- FILES ON THE DISK
- -----------------
-
- Turbo Access Folder
- SetConst.pas - A configuration program for the Turbo Access unit
- SetConst.rsrc - Rmaker compiled resource used by Setconst.Pas
- TAccess.unit - Low-level database routines used by all programs
- TAccess.r - Rmaker source file for resource used
- by TAccess.Unit
- TAccess.rsrc - Rmaker compiled resource for TAccess.Unit
- TAHigh.unit - High-level database routines
-
- Access Samples Folder
- HITAdemo.pas - Demonstration program for using the high-level
- database routines in the TAhigh.Unit.
- TADemo.pas - Demonstration program for using the low-level
- database routines in the TAccess.Unit
- TADemo.const - Constants used by HITAdemo.Pas and
- TAdemo.Pas
- TADemo.types - Type definitions used by HITAdemo.Pas
- and TAdemo.Pas
- Btree Sample Folder
- Btree.pas - Sample database program using TAccess unit
- Btree.const - Constants used by Btree.Pas
- Btree.types - Type definitions used by Btree.Pas
- BtreeTA.unit - BTree's Turbo Access interface unit
- Btree.r - Rmaker source file for resource used by Btree.Pas
- Btree.rsrc - Rmaker compiled resource used by Btree
-
- Const Source Folder
- ConstUser.unit - Calculation unit used by Setconst.Pas
- SetConst.r - Rmaker source file for resource used by
- Setconst.Pas
- Turbo Sort Folder
- Sort.unit - Routines to implement a Quicksort for
- up to 32K items
- Sort - Compiled version of Sort.unit
- LSort.unit - Routines to implement a Quicksort for over
- 2 billion items
- LSort - Compiled version of LSort.unit.
-
- Sort Samples Folder
- SortEx1.pas - Sort demonstration program using Sort.Unit
- SortEx2.pas - Multiple key sort demonstration program using
- Sort.Unit
- Stock.data - Data file used by sort example programs.
- Customer.data - Data file used by sort example programs.
-